package com.atguigu.gulimall.order.web;

import com.atguigu.gulimall.order.service.OrderService;
import com.atguigu.gulimall.order.vo.OrderConfirmVO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author : wenchao.long
 * @date : Created in 2021/8/18 17:18 周三
 * @description :
 */
@Controller
@AllArgsConstructor
public class OrderWebController {

    private final OrderService orderService;

    @GetMapping("/toTrade")
    public String toTrade(Model model) {
        OrderConfirmVO confirmVO = orderService.confirmOrder();
        model.addAttribute("orderConfirmData", confirmVO);
        return "confirm";
    }
}
